package com.gxa.uhome.service.impl;

import com.gxa.uhome.mapper.ShipperMapper;
import com.gxa.uhome.pojo.Shipper;
import com.gxa.uhome.service.ShipperService;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.List;

/**
 * @Author: XHZ
 * @Date: 11:34 2021/6/7
 */
@Service
public class ShipperServiceImpl implements ShipperService {
    @Resource
    ShipperMapper shipperMapper;

    @Override
    public Integer insert(Shipper shipper) {
        return shipperMapper.insert(shipper);

    }

    @Override
    public List<Shipper> selectLikeByPage(String nameOrPhone, Boolean isUse, Integer offset, Integer size) {
        return shipperMapper.selectLikeByPage(nameOrPhone, isUse, offset, size);
    }

    @Override
    public List<Shipper> selectByPage(Boolean isUse, Integer offset, Integer size) {
        return shipperMapper.selectByPage(isUse, offset, size);
    }

    @Override
    public Integer deleteByPhone(String phone) {
        return shipperMapper.deleteByPhone(phone);
    }

    @Override
    public Integer update(Shipper shipper) {
        return shipperMapper.update(shipper);
    }

    @Override
    public Integer updateIsUseById(Integer id, Boolean isUse) {
        return shipperMapper.updateIsUseById(id, isUse);
    }

    @Override
    public Integer selectMaxId() {
        return shipperMapper.selectMaxId();
    }

    @Override
    public Integer count() {
        return shipperMapper.count();
    }

    @Override
    public Shipper loginByPhone(String phone, String pwd) {
        return shipperMapper.loginByPhone(phone);
    }

    @Override
    public Shipper selectNameByPhone(String phone) {
        return shipperMapper.loginByPhone(phone);
    }

}
